package com.beidouapp.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.beidouapp.mapper.RoleAndResourceMapper;
import com.beidouapp.domain.example.RoleAndResourceExample;
import com.beidouapp.domain.pojo.Resource;
import com.beidouapp.domain.pojo.RoleAndResource;
import com.beidouapp.dao.RoleAndResourceManager;

@Repository
public class RoleAndResourceManagerImpl implements RoleAndResourceManager
{

	@Autowired
	private RoleAndResourceMapper mapper;
	
	@Override
	public int countByExample(RoleAndResourceExample example)
	{
		return mapper.countByExample(example);
	}

	@Override
	public int deleteByExample(RoleAndResourceExample example)
	{
		return mapper.deleteByExample(example);
	}

	@Override
	public int insert(RoleAndResource record)
	{
		return mapper.insert(record);
	}

	@Override
	public int insertSelective(RoleAndResource record)
	{
		return mapper.insertSelective(record);
	}

	@Override
	public List<RoleAndResource> selectByExample(RoleAndResourceExample example)
	{
		return mapper.selectByExample(example);
	}

	@Override
	public int updateByExampleSelective(RoleAndResource record, RoleAndResourceExample example)
	{
		return mapper.updateByExampleSelective(record, example);
	}

	@Override
	public int updateByExample(RoleAndResource record, RoleAndResourceExample example)
	{
		return mapper.updateByExample(record, example);
	}

	@Override
	public List<Resource> findRoleResourcesByRoleId(Integer roleId)
	{
		return mapper.findRoleResourcesByRoleId(roleId);
	}
	
}
